package com.xiaoxin.yixinai.dict;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.xiaoxin.yixinai._frame.base.BaseRepository;

@Repository
public interface DictRepository extends BaseRepository<Dict> {

	/**
	 * 根据分类编码查询
	 * @param infoType 分类编码
	 * @param isDelete
	 * @return
	 */
	List<Dict> findByInfoTypeAndIsDelete(String infoType, Integer isDelete);
	
	/**
	 * 根据分类编码和是否子级查询
	 * @param infoType 根据分类编码查询
	 * @param sysTag 区分子级和父级
	 * @param isDelete
	 * @return
	 */
	List<Dict> findByInfoTypeAndSysTagAndIsDeleteOrderByInfoOrderAsc(String infoType, Integer sysTag, Integer isDelete);
	
	/**
	 * 查询公司下的数据字典
	 * @param infoType
	 * @param sysTag
	 * @param isDelete
	 * @param companyId
	 * @return
	 */
	List<Dict> findByInfoTypeAndSysTagAndIsDeleteAndCompanyIdOrderByInfoOrderAsc(String infoType, Integer sysTag, Integer isDelete, Integer companyId);
}
